//
//  WebViewController.m
//  ELife
//
//  Created by xiaozhi on 11-7-6.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "WebViewController.h"


@implementation WebViewController
@synthesize webView = _webView;
NSString *_urlStr;

-(id)initWithUrl:(NSString *)urlStr
{
    self = [super initWithNibName:@"WebViewController" bundle:nil];
    if (self) {
        _urlStr = urlStr;
    }
    return self;

}


- (void)dealloc
{
    [_webView release];
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    NSURL *url = [NSURL URLWithString:_urlStr];
    NSURLRequest *resquestobj =[ NSURLRequest requestWithURL:url];
    
    [_webView loadRequest:resquestobj];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
